<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>转让钻石</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no, maximum-scale=1.0" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta name="msapplication-tap-highlinght" content="no" />
    <script type="text/javascript" src="/static/js/jquery190.js"></script>
    <style type="text/css">
        html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, em, img, ins, s, strong, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, footer, header, menu, section, input{margin: 0; padding: 0; border: none; font-size: 100%; font: inherit; font-family: Arial, 微软雅黑; vertical-align: baseline; tap-highlight-color: transparent; -ms-tap-highlight-color: transparent; -moz-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;}
        input, select, textarea{font-size: 100%; outline: none; border: none; background: none;}
        a{text-decoration: none;}
        ol, ul, li{list-style: none;}
        .clearfix{*zoom: 1; display: block;}
        .clearfix:after{content: "."; display: block; height: 0; clear: both; visibility: hidden;}
        .clear{clear: both;}
        html{height: 100%; background: url(/static/images/hallbg.jpg) no-repeat center bottom,url(/static/images/bg.jpg) repeat-y; background-size: 100% auto; line-height: 1;}
        /*顶部标题*/
        .header img{display: block; width: 40.44vw; height: auto; margin: 9.244vw auto 7.733vw;}
        /*填写表单*/
        #fillOut{color: #fff;}
        #fillOut li{font-size: 4.8vw; color: #fff; font-weight: bold; margin-left: 16.355vw;}
        #fillOut li:nth-child(odd){margin-bottom: 3.733vw;}
        #fillOut li:nth-child(even){margin-bottom: 4.8vw;}
        #fillOut li:last-child{margin-bottom: 0;}
        #fillOut li input{width: 66.533vw; height: 11.6vw; background: url(/static/images/input_box.png) no-repeat; background-size: 100% 100%; border-radius: 9vw; font-size: 4.8vw; text-indent: 5vw; color: #fff;}
        /*钻石数量*/
        #fillOut div.info{margin: 21.244vw auto 12.622vw 31.822vw; font-size: 4.8vw; font-weight: bold; line-height: 1.5;}
        #fillOut div.info p em{color: rgb(255, 0, 0);}
        /*底部按钮*/
        #fillOut div.cBtn{margin: 0 auto auto 14.755vw; height: 11.867vw;}
        #fillOut div.cBtn input{display: block; width: 31.335vw; height: 11.867vw; float: left;}
        #fillOut input#remove{background: url(/static/images/remove.png) no-repeat; background-size: 100%;}
        #fillOut input#confirm{background: url(/static/images/confirm_btn.png) no-repeat; background-size: 100%; margin-left: 7.822vw;}
        /*ipad*/
        @media screen and (min-width: 450px){
            #fillOut li{font-size: 4vw;}
            #fillOut div.info{margin-top: 17vw;}
        }
    </style>
</head>
<body>
    <div class="wrap clearfix">
        <div class="header">
            <img src="/static/images/attorn_logo.png" alt=""/>
        </div>
        <form action="" method="post" id="fillOut">
            <ul>
                <li>ID号码</li>
                <li><input type="text" name="uid" value="" maxlength="7"/></li>
                <li>转让数量</li>
                <li><input type="text" name="diamond" value=""/></li>
            </ul>
            <div class="info">
                <p>剩余钻石：{$user['diamond']}</p>
                <p>转让钻石：<em></em></p>
            </div>
            <div class="cBtn">
                <input type="hidden" id="oid" name="oid" value="{$oid}">
                <input type="button" id="remove" value="" onclick="location.href='{$url}';"/><!--取消-->
                <input type="submit" id="confirm" value=""/><!--确认-->
            </div>
        </form>
    </div>
</body>
<script>
    $(document).ready(function(){
        // ID号码
        $('input[name=ID]').keyup(function(){
            if(/[^\d]/.test($(this).val())){
                var res=$(this).val().replace(/[^\d]/g,'');
                $(this).val(res);
            }
        });
        // 转让数量
        $('input[name=amount]').keyup(function(){
            if(/[^\d]/.test($(this).val())){
                var res=$(this).val().replace(/[^\d]/g,'');
                $(this).val(res);
            }
            $(".info em").text($('input[name=amount]').val().replace(/[^\d]/g,''));
        });
    });
</script>
</html>